<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ProductAttrKey extends Model
{
    protected $table = 'product_attr_key';

    //设置主键值
    protected $primaryKey = 'id';
    public $timestamps = true;

    public function productAttrVal()
    {
        //先关联后自己
        return $this->hasMany(ProductAttrVal::class, 'key_id', 'id');
    }
}
